package com.fanjun.learning.io.aio;

/**
 * Created by memedai on 2017/2/14.
 */
public class TimeServer {

    public static void main(String[] args){
        int port = 8080;
        if (args != null && args.length > 0){
            try{
                port = Integer.valueOf(args[0]);
            }catch (NumberFormatException ex){
                port = 8080;
            }
        }
        AsyncTimeServerHandler timeServerHandler = new AsyncTimeServerHandler(port);
        new Thread(timeServerHandler, "AIO-AsyncTimeServerHandler-001").start();
    }

}
